﻿using com.nm.Attributes;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BaseAPI.model
{
    public class BtnData
    {

    }

    public class ModifyBtnData : CreateBtnData
    {
        [ParamDescription("ID")]
        public int ID { get; set; }

        [JsonProperty(NullValueHandling = NullValueHandling.Include)]
        [ParamDescription("系统按钮风格")]
        public string Sytle { get; set; }
    }

    public class CreateBtnData
    {
        [ParamDescription("按钮名称")]
        public string BtnName { get; set; }

        [ParamDescription("按钮样式")]
        public int CssID { get; set; }

        [JsonProperty(NullValueHandling = NullValueHandling.Include)]
        [ParamDescription("按钮事件")]
        public string BtnEvent { get; set; }

        [ParamDescription("按钮ID")]
        public string BtnID { get; set; }

        [JsonProperty(NullValueHandling = NullValueHandling.Include)]
        [ParamDescription("显示顺序", DefaultValue = 0)]
        public int? Sort { get; set; }

        [ParamDescription("是否有效")]
        public bool IsEffective { get; set; }
        
        [ParamDescription("按钮类型(0系统默认标准按钮)")]
        public bool BtnType { get; set; }

        [JsonProperty(NullValueHandling = NullValueHandling.Include)]
        [ParamDescription("说明", DefaultValue = "")]
        public string Memo { get; set; }

        [JsonProperty(NullValueHandling = NullValueHandling.Include)]
        [ParamDescription("模态框ID,为空时不作模态框处理")]
        public string MoldID { get; set; }

        [JsonProperty(NullValueHandling = NullValueHandling.Include)]
        [ParamDescription("按钮背景色")]
        public string BackColor { get; set; }

        [JsonProperty(NullValueHandling = NullValueHandling.Include)]
        [ParamDescription("图标")]
        public string Icon { get; set; }

    }

    public class InitData
    {
        [ParamDescription("多模块按钮集合")]
        public IList<SingleData> list { get; set; }

        [Description("单个模块数据")]
        public class SingleData
        {
            [ParamDescription("模块ID")]
            public int ModuleID { get; set; }

            [ParamDescription("按钮列表")]
            public IList<int> BtnList { get; set; }
        }
    }

    public class ResutData
    {
        [ParamDescription("模块ID")]
        public int ModuleID { get; set; }

        [ParamDescription("按钮ID集")]
        public IList<int> BtnList { get; set; }

    }
}
